

import ala from 'ala'
export default {
  async diy (jsThis, theme) {
    var para = {
      themeId: theme.id
    }
    ala.progressOpen('正在登录中,预计时间<span style="color: red;">1分钟</span>，请勿离开或刷新页面...')
    var response = await ala.diyHttpGet('api/DiyClient/GetLoginUrl', para)
    jsThis.redirectUrl = response.message
    ala.progressClose()
  },

  // 跳转防止浏览器拦截
  redirect (url) {
    if (url) {
      window.open(url, '_blank')
    }
  }
}
